package com.example.shop_car_2208.adapter

import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.shop_car_2208.R
import com.example.shop_car_2208.entity.CateEntity
import com.example.shop_car_2208.entity.Data

import com.example.shop_car_2208.utils.GlideUtils

class GoodsAdapter: BaseQuickAdapter<Data,BaseViewHolder>(R.layout.item_goods) {
    override fun convert(holder: BaseViewHolder, item: Data) {
        holder.setText(R.id.good_tv,item.goods_desc)
        holder.setText(R.id.good_money,"${item.goods_default_price}元起")//不能直接item.goods_default_price会报错
        GlideUtils.loafImage(context,holder.getView(R.id.good_iv),item.goods_default_icon)
    }

}